package com.lorenzogao.pley.ui.data

import com.lorenzogao.pley.bean.BaseBean
import com.lorenzogao.pley.bean.LoginBean
import com.lorenzogao.pley.bean.requestbean.LoginRequestBean
import com.lorenzogao.pley.ui.data.http.ApiService
import com.lorenzogao.pley.ui.presenter.contract.LoginContract
import io.reactivex.Observable


/**
 * 作者：Lorenzo Gao
 * Date: 2018/1/5
 * Time: 11:26
 * 邮箱：2508719070@qq.com
 * Description:
 */

class LoginModel(apiService: ApiService) : LoginContract.ILoginModel {

    private  var mApiService: ApiService = apiService


    override fun login(phone: String, password: String): Observable<BaseBean<LoginBean>> {
        var  params=LoginRequestBean(phone,password)

        return mApiService.login(params)
    }
}
